home *** CD-ROM | disk | FTP | other *** search
- #! moat
-
- xtAppInitialize
-
- #------------------------------------------------------------------------
- # Build the Main Window, with its menubar and quit button.
- #
- xmMainWindow .top managed
- xmMenuBar .top.bar managed
-
- xmCascadeButton .top.bar.File managed
- xmCascadeButton .top.bar.Edit managed
-
- #------------------------------------------------------------------------
- xmPulldownMenu .FileMenu
- .top.bar.File setValues -subMenuId .FileMenu
-
- foreach b {Open Reopen - Save SaveAs - Quit} {
- if { $b == "-" } {
- xmSeparator .FileMenu.sep managed
- } {
- xmPushButton .FileMenu.$b managed
- }
- }
- .FileMenu.Quit activateCallback {exit 0}
-
- #------------------------------------------------------------------------
- xmPulldownMenu .EditMenu
- .top.bar.Edit setValues -subMenuId .EditMenu
-
- foreach b {Undo - Copy Cut Paste -} {
- if { $b == "-" } {
- xmSeparator .EditMenu.sep managed
- } {
- xmPushButton .EditMenu.$b managed
- }
- }
- .EditMenu.Undo setValues -sensitive False
-
- xmCascadeButton .EditMenu.Options managed
-
- xmPulldownMenu .OptionsSubMenu
- .EditMenu.Options setValues -subMenuId .OptionsSubMenu
- foreach b {Color Width Pattern} {
- xmPushButton .OptionsSubMenu.$b managed
- }
-
- #------------------------------------------------------------------------
- # Build the Viewwing area.
- #
- xmFrame .top.area \
- -background black \
- -width 300 -height 200
- .top setValues -workWindow .top.area
- .top.area manageChild
-
- .top.bar.Edit callActionProc StartDrag() \
- -type ButtonPress \
- -x 5 -y 5
- .EditMenu.Options callActionProc StartDrag() \
- -type ButtonPress \
- -x 5 -y 5
-